package com.stop.controller;

import org.json.JSONObject;

public class StopControllerFake extends StopController{

	protected StopControllerFake() {
		
	}
	
	public JSONObject criarSala(JSONObject sala) throws Exception {
		//return new JSONObject("{\"error\":true,\"errorMsg\":\"Campos enviados inválidos.\"}");
		return new JSONObject("{\"error\":false }");
	}
	
	public JSONObject entrarSala(String uid, String option) throws Exception {
		if("desc".equalsIgnoreCase(option)){
			return new JSONObject("{\"error\":false,\"sala\":{\"vagas\":6,\"uid\":\"13bbd24a-4373-4863-884e-dcb8b5380a8e\",\"owner\":false,\"nome\":\"Wes Fodaum\",\"temas\":[\"Nome\",\"CEP\",\"Carro\",\"Fruto Verdura Legume\",\"Parte do Corpo\",\"Objeto\"],\"rodadas\":12,\"qntJogadores\":3,\"rodadaAtual\":0}}");
		}else{
			return new JSONObject("{\"error\":false,\"sala\":{\"jogadores\":[\"Jogador 1\",\"Jogador 2\",\"Weslei Ragnini\"]}}");
		}
	}
	
	public JSONObject login() throws Exception {
		return new JSONObject("{\"error\":false }");
	}
	
	public JSONObject sairSala(String uid) throws Exception {
		return new JSONObject("{\"error\":false }");
	}
	
	public JSONObject salas() throws Exception {
		return new JSONObject("{\"salas\":[{\"vagas\":12,\"uid\":\"1929d6e3-6352-428d-9af8-66745273b0e9\",\"nome\":\"Fudidinha com vc\",\"jogadores\":3,\"jogando\":false,\"rodadaAtual\":0,\"rodadas\":12},{\"vagas\":6,\"uid\":\"13bbd24a-4373-4863-884e-dcb8b5380a8e\",\"nome\":\"Wes Fodaum\",\"jogadores\":2,\"jogando\":true,\"rodadas\":8,\"rodadaAtual\":2}],\"error\":false}");
	}
	
}
